require("../../../common/manifest.js"), require("../../../common/vendor.js"), global.webpackJsonpMpvue([ 2 ], {
    "4wAZ": function(t, e) {},
    O99m: function(t, e, s) {
        Object.defineProperty(e, "__esModule", {
            value: !0
        });
        var a = s("5nAL"), i = s.n(a), n = s("b8g2");
        new i.a(n.a).$mount();
    },
    b8g2: function(t, e, s) {
        var a = s("xFaK"), i = s("gl2u"), n = s("ybqe")(a.a, i.a, function(t) {
            s("4wAZ");
        }, null, null);
        e.a = n.exports;
    },
    gl2u: function(t, e, s) {
        var a = {
            render: function() {
                var t = this, e = t.$createElement, s = t._self._c || e;
                return s("div", {
                    staticClass: "main-content"
                }, [ s("div", {
                    directives: [ {
                        name: "show",
                        rawName: "v-show",
                        value: t.isConnected,
                        expression: "isConnected"
                    } ],
                    staticClass: "main-default"
                }, [ s("div", {
                    staticClass: "input-box",
                    attrs: {
                        eventid: "1"
                    },
                    on: {
                        click: t.goSearch
                    }
                }, [ s("img", {
                    staticClass: "search-icon",
                    attrs: {
                        src: "/static/images/search.png"
                    }
                }), t._v(" "), s("input", {
                    directives: [ {
                        name: "model",
                        rawName: "v-model",
                        value: t.inputVal,
                        expression: "inputVal"
                    } ],
                    staticClass: "main-input",
                    attrs: {
                        type: "text",
                        focus: t.isFocus,
                        placeholder: t.placeholder,
                        "placeholder-class": t.placeholderClass,
                        "confirm-type": t.search,
                        eventid: "0"
                    },
                    domProps: {
                        value: t.inputVal
                    },
                    on: {
                        confirm: t.searchGoResult,
                        input: function(e) {
                            e.target.composing || (t.inputVal = e.target.value);
                        }
                    }
                }) ]), t._v(" "), s("div", {
                    directives: [ {
                        name: "show",
                        rawName: "v-show",
                        value: 0 !== t.searchTagOption.length,
                        expression: "searchTagOption.length !== 0"
                    } ],
                    staticClass: "search-tag-content"
                }, [ s("div", {
                    staticClass: "search-tag-cate"
                }, [ s("div", {
                    staticClass: "search-tag-color"
                }), t._v(" "), s("p", {
                    staticClass: "search-tag-title"
                }, [ t._v("热词") ]) ], 1), t._v(" "), s("div", {
                    staticClass: "search-tag-box"
                }, t._l(t.searchTagOption, function(e, a) {
                    return s("div", [ s("div", {
                        staticClass: "search-tag-option",
                        attrs: {
                            eventid: "2_" + a
                        },
                        on: {
                            click: function(s) {
                                t.iconGoResult(e.word);
                            }
                        }
                    }, [ t._v("\n          " + t._s(e.word) + "\n          ") ]) ]);
                })) ]), t._v(" "), s("div", {
                    directives: [ {
                        name: "show",
                        rawName: "v-show",
                        value: 0 !== t.searchHistoryOption2.length,
                        expression: "searchHistoryOption2.length !== 0"
                    } ],
                    staticClass: "search-history-content"
                }, [ s("div", {
                    staticClass: "search-tag-cate"
                }, [ s("div", {
                    staticClass: "search-tag-color"
                }), t._v(" "), s("p", {
                    staticClass: "search-history-title"
                }, [ t._v("搜索历史") ]) ], 1), t._v(" "), s("div", {
                    staticClass: "search-history-box"
                }, t._l(t.searchHistoryOption2, function(e, a) {
                    return s("div", [ s("div", {
                        staticClass: "search-tag-option",
                        attrs: {
                            eventid: "3_" + a
                        },
                        on: {
                            click: function(e) {
                                t.historyGoResult(a);
                            }
                        }
                    }, [ t._v("\n          " + t._s(e) + "\n          ") ]) ]);
                })) ]), t._v(" "), s("img", {
                    directives: [ {
                        name: "show",
                        rawName: "v-show",
                        value: t.isHome,
                        expression: "isHome"
                    } ],
                    staticClass: "home-btn",
                    attrs: {
                        src: "/static/images/home.png",
                        eventid: "4"
                    },
                    on: {
                        click: t.goMain
                    }
                }) ]), t._v(" "), !t.isConnected && t.isEnter ? s("div", {
                    staticClass: "network-remind"
                }, [ s("img", {
                    staticClass: "remind-icon",
                    attrs: {
                        src: "/static/images/network-remind.png"
                    }
                }), t._v(" "), s("p", [ t._v("网络开小差了~ ") ]) ], 1) : t._e() ]);
            },
            staticRenderFns: []
        };
        e.a = a;
    },
    xFaK: function(t, e, s) {
        (function(t) {
            e.a = {
                data: function() {
                    return {
                        placeholderClass: "placeholder",
                        searchTagOption: [],
                        searchHistoryOption1: [],
                        searchHistoryOption2: [],
                        content: "",
                        placeholder: "搜索你想要的壁纸类别",
                        inputVal: "",
                        isConnected: !0,
                        isFocus: !1,
                        isEnter: !1,
                        isHome: !1
                    };
                },
                onLoad: function(e) {
                    var s = this;
                    this.isHome = !1, e.channel && (this.isHome = !0), t.mpvue.setNavigationBarTitle({
                        title: "搜索"
                    }), this.isConnected = this.isFocus = this.isEnter = !0, this.inputVal = "", t.mpvue.onNetworkStatusChange(function(t) {
                        s.isConnected = t.isConnected;
                    });
                },
                onShow: function() {
                    var e = this;
                    3 === this.globalData.scene && (this.globalData.isScene = !0), this.globalData.scene = 1, 
                    t.mpvue.getStorage({
                        key: "historyWord",
                        success: function(t) {
                            for (var s in e.searchHistoryOption1 = [].concat(t.data), e.searchHistoryOption2 = t.data, 
                            e.searchHistoryOption2) e.searchHistoryOption2[s].length > 8 && (e.searchHistoryOption2[s] = e.searchHistoryOption2[s].substr(0, 8) + "...");
                        }
                    });
                },
                onShareAppMessage: function() {
                    var t = this.globalData.shareArr;
                    return {
                        title: t[Math.floor(Math.random() * t.length)],
                        path: "/pages/main/search/main?channel=search"
                    };
                },
                onHide: function() {
                    this.globalData.scene = 3;
                },
                mounted: function() {
                    var e = this;
                    t.mpvue.request({
                        url: "https://news.moxiu.com/applets/wallpaper/hotTags",
                        method: "GET",
                        dataType: "json",
                        header: {
                            "content-type": "application/json"
                        },
                        success: function(t) {
                            e.searchTagOption = t.data.data.list;
                        },
                        fail: function(e) {
                            t.mpvue.showToast({
                                title: "网络异常，请稍后再试",
                                icon: "none"
                            });
                        }
                    });
                },
                methods: {
                    searchGoResult: function(e) {
                        this.inputVal && "" !== this.inputVal.replace(/(^\s*)|(\s*$)/g, "") ? t.mpvue.navigateTo({
                            url: "/pages/main/result/main?tag=search&key=" + this.inputVal
                        }) : t.mpvue.showToast({
                            title: "你还没写东西呦~",
                            icon: "none"
                        });
                    },
                    iconGoResult: function(e) {
                        this.inputVal = e, t.mpvue.navigateTo({
                            url: "/pages/main/result/main?tag=search&key=" + e
                        });
                    },
                    historyGoResult: function(e) {
                        this.inputVal = this.searchHistoryOption1[e], t.mpvue.navigateTo({
                            url: "/pages/main/result/main?tag=search&key=" + this.inputVal
                        });
                    },
                    goMain: function() {
                        t.mpvue.redirectTo({
                            url: "/pages/main/index/main"
                        });
                    }
                }
            };
        }).call(e, s("DuR2"));
    }
}, [ "O99m" ]);